#@layout()

#define content()

<section class="content-header">

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-6">

                <div class="row mb-2">
                    <div class="col-sm-12">
                        <h1>
                            站点设置
                            <small data-toggle="tooltip" title="" data-placement="right"
                                   data-trigger="hover"><i class="nav-icon far fa-question-circle"></i></small>
                            <small> 首页 / 系统 / 站点设置</small>
                        </h1>
                    </div>
                </div>
            </div>
        </div>

    </div><!-- /.container-fluid -->

</section>

<section class="content">

    <div class="container-fluid">
        <div class="card card-outline card-primary">

            <!-- /.card-header -->
            <!-- form start -->
            <form autocomplete="off" action="#(CPATH)/admin/site/doSave" class="autoAjaxSubmit"
                  data-ok-href="#(CPATH)/admin/site/list"
                  data-ok-message="站点信息保存成功">
                <div class="card-body">

                    <input type="hidden" name="siteInfo.id" value="#(siteInfo.id ??)">

                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">站点名称</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="给您的站点起个名字" required
                                   name="siteInfo.name" value="#(siteInfo.name ??)">
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">自定义站点ID</label>
                        <div class="col-sm-6">
                            <input type="number" class="form-control" placeholder="输入ID"
                                   name="siteInfo.siteId" value="#(siteInfo.siteId ??)">
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">绑定域名</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="设置站点绑定的域名"
                                   name="siteInfo.bindDomain" value="#(siteInfo.bindDomain ??)">
                            <p class="text-muted"> 请填写绑定域名，例如 www.jpress.cn ，不要包含 http://（或https://）</p>
                        </div>
                    </div>


                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">绑定二级目录</label>

                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="二级目录..."
                                   name="siteInfo.bindPath" value="#(siteInfo.bindPath ??)">
                            <p class="text-muted"> 请填写绑定二级目录，例如 /xxxx ，目录必须以 / 开头</p>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">绑定语言</label>
                        <div class="col-sm-6">

                            #include("site_lang.html")

                        </div>
                    </div>


                </div>
                <!-- /.card-body -->
                <div class="card-footer">
                    <div class="offset-sm-2 col-sm-10 submit-block">
                        <div class="card-submit">
                            <button type="submit" class="btn btn-primary">提交</button>
                        </div>
                    </div>
                </div>
                <!-- /.card-footer -->
            </form>
        </div>
    </div>

</section>
#end
